import request from '@/utils/requestR'

export async function login(params) {
  return request(
    'POST',
    '/auth/login',
    undefined,
    params,
    {
      headers: {
        isToken: false,
      }
    }
  )
  // return request('/auth/login','POST', params)
}

export async function getCode() {
  return request(
    'GET',
    '/code',
    undefined,
    undefined,
    {
      headers: {
        isToken: false,
      }
    }
  )
  // return request('/code','GET')
}

export async function logout() {
  return request(
    'DELETE',
    'auth/logout',
    undefined,
    undefined
  )
}
